import store from '@/store/index.js';
import restUtil from '@/utils/restUtil.js';
var DeployCommand = function() {

};

DeployCommand.prototype.execute = function() {
	restUtil.postAction(store.state.workflowDesigner,"devworkflowdesigner/deploy?code="+store.state.workflowDesigner.createContext.code).then(
		function(response) {
			if (response.data.code == 1) {
				store.state.workflowDesigner.$alert('发布成功', '提示');
			} else {
				store.state.workflowDesigner.$alert(response.data.message, '提示');
			}
		});
}

export default DeployCommand